
import request from '@/utils/request';

// 查询组织列表
export async function queryOrgList(params) {
  return request('/s/org/queryPageList', {
    method: 'POST',
    data: params,
  });
}

/**
 * 查询树形组织
 * @param params
 * @returns {Promise<void>}
 */
export async function queryTreeOrgList(params) {
  return request('/s/org/queryTree', {
    method: 'POST',
    data: params,
  });
}

// 新增组织
export async function addOrg(params) {
  return request('/s/org/add', {
    method: 'POST',
    data: params,
  });
}

// 修改
export async function updateOrg(params) {
  return request('/s/org/update', {
    method: 'POST',
    data: params,
  });
}

// 删除
export async function removeOrg(params) {
  return request('/s/org/delete', {
    method: 'POST',
    data: params,
  });
}


// 组织管理员
export async function adminOrg(params) {
  return request('/s/org/queryAdmin', {
    method: 'POST',
    data: params,
  });
}
export async function queryOrgAdminByUserCode(params) {
  return request('/s/org/queryOrgAdminByUserCode', {
    method: 'POST',
    data: params,
  });
}

